<template>
    <div class="content">
            <ul>
                <li v-for='zhengzais in zhengzai'>
                    <router-link :to='{name:"details",params:{id:zhengzais.id}}'>
                        <img v-bind:src="zhengzais.cover.origin" alt="" />
                        <div>
                            <div class="left">
                                <h4 v-text='zhengzais.name'></h4>
                                <p><span v-text='zhengzais.cinemaCount'></span>家影院上映<span v-text='zhengzais.watchCount'></span>人购票</p>
                            </div>
                            <div class="right" v-text='zhengzais.grade'>
                            </div>
                        </div>
                    </router-link>
                </li>
            </ul>
            <div class='content_button'>
                <router-link to='/movie/show' style=' color:rgb(97, 97, 97)'>
                    更多热映电影
                </router-link>
            </div>
        </div>
</template>
<script>
    export default {
        data:function(){
            return{
                zhengzai:''
            }
        },
        mounted:function(){
            var that =this;
              $.get('http://10.20.159.13:3000/zhengzai', function(res) {
            that.zhengzai = res.data.films
           
                //处理时间戳的方法
                // console.log(res.data.films[1].premiereAt)
                // var date =$.myTime.UnixToDate(res.data.films[1].premiereAt,"Y-m-d H:i:s",'')
                // console.log(date)
               })
        }
    }
</script>